﻿using System;
using System.Windows.Forms;
using Scommesse.Presenters;

namespace Scommesse.View
{
    public partial class ScommesseForm : Form
    {
        private IScommessePresenter _scommessePresenter;

        public ScommesseForm()
        {
            InitializeComponent();
        }

        public void AddListener(IScommessePresenter presenter)
        {
            _scommessePresenter = presenter;
        }

        private void ScommessaForm_Load(object sender, EventArgs e)
        {
            _scommessePresenter.PopulateListView();
            _scommessePresenter.LoadDatiPersonali();
        }
        public TreeView ScommesseTreeView
        {
            get { return this.ScomessaTreeView; }
            set { this.ScomessaTreeView = value; }
        }

        public String Credito
        {
            get { return this.CreditoLabel.Text; }
            set { this.CreditoLabel.Text = value; }

        }

        public String Codice
        {
            get { return this.CodiceLabel.Text; }
            set { this.CodiceLabel.Text = value; }
        }

        public String NomeCognome
        {
            get { return this.NomeCognomeLabel.Text; }
            set { this.NomeCognomeLabel.Text = value; }
        }
    }
}